﻿@model PagedList.IPagedList <SoftHotel.Models.Perfil>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table rules="all" style="border-color: #bgbgbg; width: 600px; margin-bottom: 0px;" border="1">
    <tr>
        <th style="font-weight: bold; width: 150;" align="center">
            nombre
        </th>
        <th style="font-weight: bold; width: 100px;" align="center">
            descripcion
        </th>
        <th style="font-weight: bold; width: 200px;" align="center">
            fechaModificacion
        </th>
        <th style="font-weight: bold; width: 150px;" align="center">
            estado
        </th>
        
    </tr>

@foreach (var item in Model) {
    <tr>
        <td align="center">
            @Html.ActionLink(item.nombre, "Details", item)
        </td>
        <td align="center">
            @Html.DisplayFor(modelItem => item.descripcion)
        </td>
        <td align="center">
            @Html.DisplayFor(modelItem => item.fechaModificacion)
        </td>
        <td align="center">
            @Html.DisplayFor(modelItem => item.estado)
        </td>        
    </tr>
}

<br />
<div>
    Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
    of @Model.PageCount
     
    @if (Model.HasPreviousPage)
    {
        @Html.ActionLink("<<", "Buscar", new { page = 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
        @Html.Raw(" ");
        @Html.ActionLink("< Prev", "Buscar", new { page = Model.PageNumber - 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
    }
    else
    {
        @:<<
        @Html.Raw(" ");
        @:< Prev
    }
     
    @if (Model.HasNextPage)
    {
        @Html.ActionLink("Next >", "Buscar", new { page = Model.PageNumber + 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
        @Html.Raw(" ");
        @Html.ActionLink(">>", "Buscar ", new { page = Model.PageCount, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
    }
    else
    {
        @:Next >
        @Html.Raw(" ")
        @:>>
    }
</div>

</table>
